Box: Don't unnecessarily repeat a function call
authorDaniel Boles <dboles@src.gnome.org>
Sun, 25 Dec 2016 17:43:06 +0000 (17:43 +0000)
committerdjb <db0451@gmail.com>
Sun, 25 Dec 2016 21:46:40 +0000 (21:46 +0000)
The spacing was already saved in a variable just above.

gtk/gtkbox.c

index d19ef7d50ca8cb23b6cb4038ae7b09154506340a..67a4a410f7c644f39ed24006622ac7c287d8235d 100644 (file)
@@ -554,9 +554,9 @@ gtk_box_size_allocate_no_center (GtkWidget           *widget,
        * minimum sizes for children that are not going to fill
        */
       if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
-       size = allocation->width - (nvis_children - 1) * get_spacing (box);
+       size = allocation->width - (nvis_children - 1) * spacing;
       else
-       size = allocation->height - (nvis_children - 1) * get_spacing (box);
+       size = allocation->height - (nvis_children - 1) * spacing;
 
       extra = size / nvis_children;
       n_extra_widgets = size % nvis_children;